import request from "@/utils/request";

export function page(data) {
  return request({
    url: "/v1/file/page",
    method: "get",
    params: data
  });
}

export function deleteById(id) {
  return request({
    url: "/v1/file/delete/" + id,
    method: "get"
  });
}

export function savePatch(data) {
  return request({
    url: "/v1/file/savePatch",
    method: "post",
    data
  });
}

//保存 JSON
export function savaJson(data) {
  return request({
    url: "/v1/configuration/save",
    method: "post",
    data
  });
}

//查询JSON
export function checkJson(id) {
  return request({
    url: "/v1/configuration/"+id,
    method: "get"
  });
}


//
//编辑 JSON
export function updateJson(data) {
  return request({
    url: "/v1/configuration/update",
    method: "put",
    data
  });
}



// //模糊搜索

// export function searchList(data) {
//   return request({
//     url: "/v1/file/page",
//     method: "post",
//     data
//   });
// }
